import request from '@/utils/request'

export function listResource(query) {
  return request({
    url: '/store/resource/list',
    method: 'get',
    params: query
  })
}

export function getResource(id) {
  return request({
    url: '/store/resource/' + id,
    method: 'get'
  })
}

export function addResource(data) {
  return request({
    url: '/store/resource/add',
    method: 'post',
    data: data
  })
}

export function updateResource(data) {
  return request({
    url: '/store/resource',
    method: 'put',
    data: data
  })
}

export function delResource(id) {
  return request({
    url: '/store/resource/' + id,
    method: 'delete'
  })
}

export function getAllResource() {
  return request({
    url: '/store/resource/getAll',
    method: 'get'
  })
}

//获取库存列表
export function foodStoreList(query) {
  return request({
    url: '/food/store/list',
    method: 'get',
    params:query
  })
}

//获取库存列表
export function foodStoreGetAll(query) {
  return request({
    url: '/food/store/getAll',
    method: 'get',
    params:query
  })
}

//获取库存变更明细
export function storeMoveList(query) {
  return request({
    url: '/system/move/list',
    method: 'get',
    params:query
  })
}

export function updateStock(data) {
  return request({
    url: '/food/store',
    method: 'put',
    data:data
  })
}

